#pragma once

#include "stdafx.h"

class CPEFile
{
public:
    CPEFile(void);
    virtual ~CPEFile(void);
public:
    virtual BOOL PeOpen() = 0;
    virtual BOOL PeRead(IN  ULONGLONG Offset, 
                        OUT PVOID Buffer, 
                        IN  ULONG Length) = 0;
    virtual BOOL PeWrite(IN  ULONGLONG Offset, 
                         IN  PVOID Buffer, 
                         IN  ULONG Length) = 0;
    virtual VOID PeClose() = 0;

    VOID SetOpenMode(BOOL IsMap);
    BOOL PeOpen(BOOL IsMap);
    BOOL IsMapped();

private:
    BOOL m_IsMap;
};

